import * as types from './mutation-types'

export const toggleDevice = ({ commit }, device) => commit(types.TOGGLE_DEVICE, device);

export const setUser = ({ commit }, data) => {
  if (data) {
    commit(types.SET_USER, data)
  }
};
export const putRouter = ({ commit }, data) => {
  if (data) {
    commit(types.PUT_ROUTER, data)
  }
};
export const popRouter = ({ commit }, data) => {
    commit(types.POP_ROUTER, data)
};
export const setMessages = ({ commit }, data) => {
  commit(types.SET_MESSAGES, data)
};
